package com.xj.homework.pattern.factory.simpleFactory;

/**
 * 简单工厂模式
 *      工厂根据传入的类型创建对应类型的对象
 */
public class Test {
    public static void main(String[] args) {
        PhoneFactory factory = new PhoneFactory();
        Phone phone = factory.createPhone("三星");
        phone.call();
        Phone apple = factory.createPhone("apple");
        apple.call();
    }
}
